package com.ddwl.schema.vo.order;

import com.alibaba.fastjson.annotation.JSONField;
import com.ddwl.schema.serialize.InstantSerializer;
import com.ddwl.schema.vo.gate.RegionVo;
import com.ddwl.schema.vo.user.UserVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.Instant;
import java.util.List;

/**
 * @author Fu Zhaohui
 * @version 1.0.0
 * @date 2019/6/14 10:49
 */
@ApiModel("订单信息Vo")
@Setter
@Getter
public class OrderVo implements Serializable {

    @ApiModelProperty("订单ID")
    private String id;
    @ApiModelProperty("商户ID")
    private String mchId;
    @ApiModelProperty("商户名称")
    private String mchName;
    @ApiModelProperty("门店ID")
    private String shopId;
    @ApiModelProperty("门店名称")
    private String shopName;
    @ApiModelProperty("订单类型")
    private Byte type;
    @ApiModelProperty("订单内容")
    private String content;
    @ApiModelProperty("用户信息")
    private UserVo user;
    @ApiModelProperty("订单金额")
    private BigDecimal amount;
    @ApiModelProperty("返现金额")
    private BigDecimal recash;
    @ApiModelProperty("支付记录")
    private List<PaymentVo> payments;
    @ApiModelProperty("收货地址")
    private OrderAddrVo address;
    @ApiModelProperty("订单状态 0未支付 1已支付 2已发货 3已签收 4已取消 5退款中 6已退款")
    private Byte status;
    @ApiModelProperty("购物车里商品")
    private List<OrderItemVo> items;
    @ApiModelProperty("所在区域")
    private RegionVo region;
    @ApiModelProperty("获得积分")
    private Integer score;
    @ApiModelProperty("子订单")
    private List<OrderVo> subOrders;

    @ApiModelProperty("产品")
    private String product;
    @ApiModelProperty("备注")
    private String remark;
    @ApiModelProperty("创建时间")
    @JSONField(serializeUsing = InstantSerializer.class)
    private Instant gmtCreated;
    @ApiModelProperty("修改时间")
    @JSONField(serializeUsing = InstantSerializer.class)
    private Instant gmtModified;
}
